package level.model;

// Immutable wrapper object for xml->java conversions

public class Attribute implements Addable
{
	public Attribute(String name, String value)
	{
		this.name = name;
		setValue(value);
	}
	
	public String getName()
	{
		return name;
	}
	
	public String getValue()
	{
		return value;
	}
	
	public void setValue(String value)
	{
		this.value = value;
	}
	
	@Override
	public boolean equals(Addable addable)
	{
		if(name == ((Attribute) addable).getName() 
		&& value == ((Attribute) addable).getValue())
		{
			return true;
		}
		return false;
	}

	@Override
	public Addable cloneAddable()
	{
		return new Attribute(name, value);
	}
	
	private String name;
	private String value;
}
